<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=emulateIE7" />
    <link  th:href="@{/css/style.css}" rel="stylesheet"/>
    <link  th:href="@{/css/skin/login.css}" rel="stylesheet"/>
    <script  th:src="@{/js/jquery.js}"></script>
    <script  th:src="@{/js/jquery.select.js}"></script>
    <title>E接口监测系统123</title>
    <style type="text/css">

    </style>
</head>
<body>
<div id="container">
    <div id="bd">
        <div id="main">
            <div class="login-box">
                <form action="/gydz/api/login" method="post">
                    <div id="logo"></div>
                    <h1 style=" font-size: 32px;font-weight: bold;color: #0580d8;letter-spacing: 4px;">E接口监测系统123</h1>
                    <div class="input username" id="username">
                        <label for="userName">账&nbsp;号</label>
                        <span></span>
                        <input type="text" id="userName"  name="userAccount" />
                    </div>
                    <div class="input psw" id="psw">
                        <label for="password">密&nbsp;&nbsp;&nbsp;&nbsp;码</label>
                        <span></span>
                        <input type="password" id="password" name="password" />
                    </div>
                    <div id="btn" class="loginButton">
                        <input type="submit" class="button" id="loginBtn" value="登录"  />
                        <a href="/gydz/user/forgetPwd" title="忘记密码" style="text-decoration:none">忘记密码</a>
                    </div>
                </form>
            </div>
        </div>
        <div id="ft" style="color:#fff;font-size:16px;">CopyRight&nbsp;©&nbsp;&nbsp;广州市广源电子科技有限公司</div>
    </div>

</div>
<script type='module'>
    import {encrypt} from "./utils/jsencryptUtils.js";
    var height = $(window).height() > 445 ? $(window).height() : 445;
    $("#container").height(height);
    var bdheight = ($(window).height() - $('#bd').height()) / 2 - 20;
    $('#bd').css('padding-top', bdheight);
    $(window).resize(function(e) {
        var height = $(window).height() > 445 ? $(window).height() : 445;
        $("#container").height(height);
        var bdheight = ($(window).height() - $('#bd').height()) / 2 - 20;
        $('#bd').css('padding-top', bdheight);
    });
    $('select').select();
    // 登录前对输入密码进行rsa加密
    $('#loginBtn').click(function(){
        var pass = document.getElementById('password').value;
        document.getElementById('password').value = encrypt(pass);
    });
</script>
</body>
</html>